<nz-breadcrumb style="margin:12px 0;">
    <nz-breadcrumb-item>剩余时间：{{timeStr}}</nz-breadcrumb-item>
</nz-breadcrumb>
<div style="background:#fff; padding: 24px; min-height: 280px;">
    <app-only-questions *ngIf="examResult!=null && examResult.questionType=='Only'" [item]="examResult.data" [userExam]="userExam"
        (userExamChange)="examEvent($event)"></app-only-questions>
    <app-several-questions *ngIf="examResult!=null && examResult.questionType=='Several'" [item]="examResult.data" [userExam]="userExam"
        (userExamChange)="examEvent($event)"></app-several-questions>
    <app-filling-questions *ngIf="examResult!=null && examResult.questionType=='Filling'" [item]="examResult.data" [userExam]="userExam"
        (userExamChange)="examEvent($event)"></app-filling-questions>
    <!-- <app-error-correction-questions *ngIf="examResult!=null && examResult.questionType=='Error'" [item]="examResult.data" [userExam]="userExam" (userExamChange)="examEvent($event)"></app-error-correction-questions> -->
    <app-programme-questions *ngIf="examResult!=null && examResult.questionType=='Programme'" [item]="examResult.data" [userExam]="userExam"
        (userExamChange)="examEvent($event)"></app-programme-questions>

    <div class="btnDiv">
        <nz-button-group>
            <button nz-button [nzType]="'primary'" (click)="prev()">
                <i class=" anticon anticon-left"></i>
                <span>上一题</span>
            </button>
            <button nz-button [nzType]="'primary'" (click)="next()" style="margin-left: 10px;">
                <span>下一题</span>
                <i class=" anticon anticon-right"></i>
            </button>
        </nz-button-group>
    </div>
</div>

<nz-modal [nzVisible]="isVisible" [nzTitle]="'答题结束'" [nzContent]="modalContent" (nzOnCancel)="handleCancel($event)"
    (nzOnOk)="handleOk($event)">
    <ng-template #modalContent>
        <p>选择题共答对：{{success}} 道题目</p>
        <p>选择题共打错：{{error}} 道题目</p>
    </ng-template>
</nz-modal>

<div nz-row *ngIf="isShowAnswer" style="margin-top: 10px;">
    <div nz-col [nzSpan]="2" [nzOffset]="'2'">
        <h3>答案：</h3>
    </div>
    <div nz-col [nzSpan]="20">
        <div *ngIf="examResult.data.answer != null" [innerText]="examResult.data.answer">
        </div>

        <div *ngIf="examResult.questionType=='Several'">
            <div nz-col [nzSpan]="20">
                <label *ngIf="examResult.data.answerA != null">
                    A
                </label>
            </div>
            <div nz-col [nzSpan]="20">
                <label *ngIf="examResult.data.answerB != null">
                    B
                </label>
            </div>
            <div nz-col [nzSpan]="20">
                <label *ngIf="examResult.data.answerC != null">
                    C
                </label>
            </div>
            <div nz-col [nzSpan]="20">
                <label *ngIf="examResult.data.answerD != null">
                    D
                </label>
            </div>
        </div>
        <div *ngIf="examResult.questionType!='Several'">
            <div nz-col [nzSpan]="20">
                <div *ngIf="examResult.data.answerA != null" [innerText]="examResult.data.answerA">
                </div>
            </div>
            <div nz-col [nzSpan]="20">
                <div *ngIf="examResult.data.answerB != null" [innerText]="examResult.data.answerB">
                </div>
            </div>
            <div nz-col [nzSpan]="20">
                <div *ngIf="examResult.data.answerC != null" [innerText]="examResult.data.answerC">
                </div>
            </div>
            <div nz-col [nzSpan]="20">
                <div *ngIf="examResult.data.answerD != null" [innerText]="examResult.data.answerD">
                </div>
            </div>
        </div>
    </div>
</div>
<div nz-row *ngIf="isShowAnswer && examResult.data.note != null" style="margin-top: 10px;">
    <div nz-col [nzSpan]="2" [nzOffset]="'2'">
        <h3>解析：</h3>
    </div>
    <div nz-col [nzSpan]="20">
        <div *ngIf="isShowAnswer" [innerText]="examResult.data.note">
        </div>
    </div>
</div>